package com.baiyang.app.ui.mine;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;


public class MineViewModel extends ViewModel {

    private MutableLiveData<String> bookCoin;
    private MutableLiveData<String> integral;
    private MutableLiveData<JSONObject> signInResult;
    private MutableLiveData<JSONObject> rechargeResult;

    public MineViewModel(){
        bookCoin = new MutableLiveData<>();
        integral = new MutableLiveData<>();
        signInResult = new MutableLiveData<>();
        rechargeResult = new MutableLiveData<>();
    }

    public void setBookCoin(String bookCoin) {
        this.bookCoin.postValue(bookCoin);
    }
    public void setIntegral(String integral){
        this.integral.postValue(integral);
    }
    public LiveData<String> getBookCoin(){
        return bookCoin;
    }
    public LiveData<String> getIntegral(){
        return integral;
    }
    public void setSignInResult(JSONObject object){
        this.signInResult.postValue(object);
    }
    public LiveData<JSONObject> getSignInResult(){
        return signInResult;
    }
    public void setRechargeResult(JSONObject result){
        this.rechargeResult.postValue(result);
    }
    public LiveData<JSONObject> getRechargeResult(){
        return rechargeResult;
    }
}

